Xbasic

Xdialog Commands

Description

The following commands are available in Xdialog

Name
Description
{A}

Specifies an anchor point.

{AUTO_EXTERNAL_REFRESH}

Can improve the performance of Xdialogs.

{BACKGROUND}

The {BACKGROUND} command specifies the background color the dialog.

{BEGINEMBEDDED}

The {BEGINEMBEDDED} command allows you to embed an Xdialog within another Xdialog with in-line code, rather than using the {EMBEDDED} command to define a window within the parent xdialog in which the embedded dialog will be displayed.

{BLUEFRAME}

Draws a box around one or more cells of the Xdialog grid.

{CAN_EXIT}

Allows you to trap an attempt by the user to close a Xdialog box.

{CELLSPILLOVER}

The {CELLSPILLOVER} function allows you to dynamically reposition Xdialog controls to the prior cell on a row.

{CLOSE_ON_LEAVE}

Closes a modeless dialog box when the user clicks outside the Xdialog.

{COL}

Indicate the start and end of columns in an Xdialog.

{COLOR}

Sets the foreground color for some types of controls

{COLORPICKER}

The {COLORPICKER} control displays the Color Picker dialog and returns the hexadecimal value of the selected color.

{COMMENT}

The {COMMENT} command allows you to place a comment in-line with Xdialog code.

{COMPOSITED}

The {COMPOSITED} command enables double-buffering of the screen display to reduce or eliminate screen flickering.

{CONDITION}

The {CONDITION} command allows the display of Xdialog elements to be turned on or off, depending on how a logical expression is evaluated.

{CONDITION_BEGIN}

Make portions of an Xdialog visible.

{CONDITION_ELSE}

For adding additional cases to make portions of an Xdialog visible.

{CONDITION_END}

See the example below from {CONDITION_BEGIN}.

{CURSOR}

Allows you to specify a bitmap to use for the cursor when the mouse is over a control.

{DATA}

The {DATA} command is used to modify an entry in a list of choices?. It allows you to display one value in a list box or tree control, yet store a different value.

{DEFAULTTABSTOPS}

Refer to {TABSTOPS}

{DOCKABLE}

The {DOCKABLE} command is used in an Xdialog to turn the modeless xdialog into a dockable toolbar. It can only be used if the xdialog is modeless. i.e. if you use the UI_MODELESS_DLG_BOX()command.

{DRAG_BUTTON}

For internal use only.

{DRAG_HANDLE}

Specifies which bitmap to use for the "drag handle" when the toolbar is docked.

{EMBEDDED}

The {EMBEDDED} command embeds a modeless dialog into another modeless dialog.

{ENCODING}

The {ENCODING} command defines the encoding for text in the dialog.

{ENDCOL}

Refer to the {COL} command, example shown below.

{ENDEMBEDDED}

Terminates a {BEGINEMBEDDED} command.

{ENDREGION}

Refer to the {REGION} command. {REGION} Example shown below

{ENDROW}

Terminates a {ROW}

{ENDTAB}

Terminates a {TAB}, {DEFAULTTABSTOPS}, {TABSTOPS}, or {NOTABSTOPS} command.

{EXPAND}

The {EXPAND} command allows you to display a message to the user when the function that is populating a branch of a tree control takes a long time to respond.

{FIELDSELECT}

The {FIELDSELECT} command is obsolete.

{FONT}

Defines the font, point size, and style.

{FONTLIST}

The {FONTLIST} command displays a list of installed fonts.

{FRAME}

The {FRAME} command draws a box around one or more cells of the Xdialog grid.

{GROW_TO}

The {GROW_TO} command causes all controls in a region to grow to the same height (in a row) or the same width (in a column).

{HELP}

The {HELP} command allows you to add context sensitive help to an xdialog. If you do not specify the Help_Topic_Name, the topic id in the last {Help} command encountered is used.

{HSCROLL}

The {HSCROLL} command displays a horizontal scroll bar.

{HSIZER}

The {HSIZER} command allows you to stretch a docked toolbar to the left or right.

{HSLIDER}

The {HSLIDER} command places a vertical bar on the dialog that you can slide horizontally to increase the size of one portion of the dialog while decreasing the size of another portion.

{HTML}

The {HTML} xdialog command displays an HTML window using Alpha Anywhere internal HTML control.

{HYPERLINK}

{HYPERLINK} creates a button that looks like a hyperlink.

{ICON}

The {ICON} command is used in MDI modeless xdialogs to specify the name of the bitmap to use as the icon on the title bar.

{IMAGE}

The {Image} command displays a bitmap (.BMP), cursor (.CUR), or icon (.ico) image. This command is to be used with transparent images.

{IMAGE_OPAQUE}

The {IMAGE_OPAQUE} command displays a bitmap (.BMP) image. This command is to be used with opaque images that are drawn at the same time as the background.

{ImageViewer}

Allows you to load image from files on disk and view them in a window on an Xdialog.

{INCLUDE}

The {INCLUDE} function allows you to call Help_Topic_Name when the name of the help file has been dynamically calculated within the Xdialog.

{INITIAL_FOCUS}

By default the control that has focus when a dialog is opened is the first control on the dialog, however, you may specify a different control.  The {INITIAL_FOCUS} command precedes the control that should have initial focus.

{INTERVAL}

The {INTERVAL} command is used to specify how frequently the timer event fires if a timer event is specified.

{JUSTIFY}

The {JUSTIFY} command controls the placement of a control within a cell in an Xdialog. The {JUSTIFY} command is typically inserted between {REGION} and {ENDREGION} commands.

{KEYPAD}

The Keypad Control is no longer supported.

{LF}

The {LF} command inserts one or more carriage return line feed sequences.

{LINE}

The {LINE} command draws a thin line vertically or horizontally for the specified number of rows or columns.

{LINKED}

Creates external dependencies between separate xdialogs.

{LISTVIEW}

The {LISTVIEW} control displays data from an Alpha Anywhere table, Access database, ADO compatible database, or ODBC compatible database in a grid format similar to that provided by Windows Explorer.

{LISTVIEWVIRTUAL}

The {LISTVIEW} control displays data from an Alpha Anywhere table, Access database, ADO compatible database, or ODBC compatible database in a grid format similar to that provided by Windows Explorer in a MDI child window.The {LISTVIEW} control displays data from an Alpha Anywhere table, Access database, ADO compatible database, or ODBC compatible database in a grid format similar to that provided by Windows Explorer in a MDI child window.

{MDICHILD}

The {MDICHILD} function declares the Xdialog to be a member of a new MDI window class.

{NEVERGAINFOCUS}

The {NEVERGAINFOCUS} prevents an Xdialog from being given focus automatically when it is instantiated. The user can still click on controls in the Xdialog and give them focus.

{NOCAPTION}

The {NOCAPTION} command suppresses the title bar of a dialog box. [Picture]

{NOCHILDREN}

Allows you to open new dialogs from a dialog without them being children of the first dialog.

{NOMOVE}

The {NOMOVE} command specifies that a dialog box cannot be moved. The command is used in conjunction with the {NOCAPTION} command.

{NOTABSTOPS}

If you use {NOTABSTOPS} then all controls after this command will not have tab stops. Refer to {TABSTOPS}

{ON_ACTIVATE}

The {ON_ACTIVATE} function sets the value of a_dlg_button and generates a virtual button click. This allows the event handlers in the %code% section to respond to external events.

{ON_CHAR}

The {ON_CHAR} command allows you to capture printable keystrokes. Contrast with {ON_KEY} which lets you trap non-printable keys, such as F2, or PAGE UP, or CTRL END.

{On_Clipboard_Change}

Fires an event when the Clipboard contents change.

{ON_DEACTIVATE}

The {ON_DEACTIVATE} function sets the value of a_dlg_button and generates a virtual button click. This allows the event handlers in the %code% section to respond to external events.

{ON_KEY}

Captures non-printable keystrokes and generates an Xdialog event.

{OVERLAY}

Creates an HTML overlay.

{PANE}

Refer to the {TAB} command.

{POSITION}

Defines the starting position for a dialog box.

{PROGRESS}

The {PROGRESS} command displays a progress bar.

{PROPGRID}

The {PROPGRID} command displays the type of control displayed below. The control provides a mechanism for displaying many prompts and accepting many inputs from the user.

{REGION}

Identifies a sequence of Xdialog commands that should be treated as a single entity.

{REGION_XMARGIN}

The {REGION_XMARGIN} command sets the left margin for the following region(s).

{REGION_YMARGIN}

The {REGION_YMARGIN} command sets the top margin for the following region(s).

{RESTRICT_DOCKING}

The {RESTRICT_DOCKING} command prevents a modeless dialog box that has been turned into a toolbar (by the inclusion of the {DOCKABLE} command) from docking. I.e. force it to always be a floating toolbar.

{RIGHTCLICK}

The {RIGHTCLICK} function responds to right-clicks. It is supported only by the Tree and List Box controls.

{ROW}

Refer to the {COL} command. Copied Example shown below.

{RTF}

The {RTF} command places an RTF text box on the Xdialog.

{SCROLLABLE}

The {SCROLLABLE} command allows an embedded xdialog to be scrolled within the window defined by its parent Xdialog. The {scrollable} keyword must be in the definition of the embedded Xdialog (not in the definition of the parent).

{SIZE}

The {SIZE} command sets the width of the dialog, using the units specified in the {UNITS} command.

{SIZEINDEX}

The {SIZEINDEX} command allows you to dynamically select between two sets of dimensions for a control. The {SIZEINDEX=} command turns off the command.

{SP}

One or more Button objects may appear inside the Format section of a UI_DLG_BOX() function.

{START_POS}

Resets the starting position of the current cell to the top-left of the previous cell.

{STARTUP}

The {STARTUP} command defines an event to fire when the Xdialog is loaded.

{STICKTO}

The {STICKTO} command defines which side(s) of the dialog box the control or region should stick to when the dialog box is stretched.

{STRETCH}

Allows the dialog box to be stretched.

{T}

The {T} function specifies a location for an anchor point {A}. Anchor points are useful when you want to accurately position buttons on a dialog using owner draw strings with tab stops. A primary application is in creating list boxes with resizable columns.

{TAB}

Tabbed dialogs allow you to organize your dialog into logical sections, and to pack a lot more information onto the dialog than a single dialog would allow.

{TabBand}

The {TabBand} command inserts a line of tabs into an Xdialog control. Each tab will display a different page.

{TABSTOPS}

All controls that come after the command will have tab stops.

{TEXT}

Displays text from a character variable.

{THEME}

The {THEME} command enables or disables XP Themes.

{TIMER}

The {TIMER} command generates timer events. The interval between events is specified by the {INTERVAL} command.

{TITLE}

The {TITLE} command can be used to create dynamic titles for Xdialog.

{TOOLCAPTION}

The {TOOLCAPTION} causes the dialog to display a special half height title bar when the dialog is configured as a toolbar. NOTE: To configure a dialog to display as a toolbar, the dialog must be modeless, and must include the {DOCKABLE} command. If the dialog is configured as a standard modal dialog (i.e. it is displayed using the ui_dlg_box() function), then the {TOOLCAPTION} command turns off the red X button in the title bar.

{TRACKBAR}

The {TRACKBAR} command puts a trackbar control on an Xdialog.

{UNITS}

Defines the units of measure. The default is inches.

Using the {Col} and {Row} Commands

In addition to the rather terse '|' column delimiter and ';' row delimiter, there is an alternate way to specify rows and columns which is similar to syntax used for tables in HTML documents. The {Col} {Endcol} command pair can be used to specify the start and end of a column, and the {Row} {Endrow} command pair can be used to specify the start and end of a row. Like the {Region} {Endregion} command, you can use an optional numeric digit with the command to help you keep track of which {Endcol} command belongs to which {Col} command, and which {Endrow} command belongs to which {Row} command. For example, {Col1} {Endcol1}. The {Col} {Endcol} and {Row} {Endrow} commands have the following rules:

Using the {Data} Command

Allows you to return a value other than the display value from a node in a tree control.

{VPAD}

The {VPAD} command applies to old style radio buttons. It sets the vertical spacing between the radio buttons. This command is not required if you use Freeform Radio Button Control Syntax.

{VSCROLL}

The {VSCROLL} command displays a vertical scroll bar.

{VSIZER}

The {VSIZER} command allows you to stretch a docked toolbar up or down.

{VSLIDER}

The {VSLIDER} command places a horizontal bar on the Xdialog that you can slide vertically to increase the size of one portion of the Xdialog while decreasing the size of another portion.

{WATCH}

The {WATCH} command monitors the value of a variable or expression and fires an event when that expression changes.

{WATCH_ACTIVE}

Monitors an array of variables and generates events when the one in the active window changes.

{WRAP}

Sets the word wrap width.

{XMARGIN}

The {XMARGIN} command sets the left and right margins of the Xdialog. Unless otherwise specified, the measurement is in terms of the default font, which is Arial 8 point.

{XPAD}

The {XPAD} commands sets the horizontal space between columns.

{XSIZE}

The {XSIZE} command changes the default horizontal spacing between controls.

{YMARGIN}

The {YMARGIN} command sets the top and bottom margins of the Xdialog. Unless otherwise specified, the measurement is in terms of the default font, which is Arial 8 point.

{YPAD}

The {YPAD} command sets the spacing between lines in points.

{YSIZE}

The {YSIZE} command sets the default vertical spacing between controls.